How to Setup GPS Rescue in Betaflight (FPV Drone Return to Home) 您所在的位置:网站首页 gps fix How to Setup GPS Rescue in Betaflight (FPV Drone Return to Home)

How to Setup GPS Rescue in Betaflight (FPV Drone Return to Home)

2024-07-13 07:38| 来源: 网络整理| 查看: 265

27.3K

Betaflight GPS Rescue mode is similar to “Return to Home” on a DJI drone. This feature is designed to fly your FPV drone back to its launch point and land it automatically in a failsafe or when your video feed gets sketchy. In this tutorial, I’m going to walk you through setting up GPS Rescue Mode, testing it, and I’ll also share some tips on enhancing its performance and troubleshooting common issues.

sponsor-banner Some of the links on this page are affiliate links. I receive a commission (at no extra cost to you) if you make a purchase after clicking on one of these affiliate links. This helps support the free content for the community on this website. Please read our Affiliate Link Policy for more information.

Table of Contents

Why GPS Rescue is a Game-Changer

Betaflight’s default failsafe action is dropping the quad to the ground. Now, with the latest GPS Rescue Mode, your drone can return close to its launch point and land by itself! This is incredibly useful for long-range flights. Honestly, I’ve lost count of how many times GPS Rescue has saved my drones.

Picking the Right GPS Module

See my GPS testing here: https://oscarliang.com/gps-review/

Top Performer: GEPRC M1025Q

AliExpress: https://s.click.aliexpress.com/e/_DCihHmP GetFPV: https://oscarliang.com/product-zixk

Top Performer: HGLRC M100 5883

AliExpress: https://s.click.aliexpress.com/e/_DlLhgFd GetFPV: https://oscarliang.com/product-bf3p RDQ: https://oscarliang.com/product-0yby

Smallest Worth Having: GOKU GM10 Nano V3

AliExpress: https://s.click.aliexpress.com/e/_DEqdlNV Amazon: https://amzn.to/4blgdYk Flywoo: https://oscarliang.com/product-jwzb GetFPV: https://oscarliang.com/product-kky6 RDQ: https://oscarliang.com/product-sglj

Smallest Worth Having: FlyFishRC M10 Mini

AliExpress: https://s.click.aliexpress.com/e/_DkCU7qr

Smallest Worth Having: HGLRC M100 Mini

GetFPV: https://oscarliang.com/product-knfl RDQ: https://oscarliang.com/product-6zvg AliExpress: https://s.click.aliexpress.com/e/_DCXKBFj

Opting for a smaller GPS module helps save weight, but it does mean you’ll sacrifice a bit of sensitivity that comes with models with a large antenna.

Generation of GPS Chip

Most GPS modules for FPV drones use either an M8 or M10 chip. M10 chips are newer and offer better performance, capable of connecting simultaneously to four Global GNSS systems (GPS, Galileo, Glonass, and Beidou). This results in faster lock-ons and connections to more satellites, especially in areas with interference or limited sky view. Despite their superior performance, M10 units aren’t much more expensive than M8 units, making them a cost-effective upgrade.

Antenna Scratches

Noticed scratches on your GPS antenna’s metallic patch? Don’t worry; this isn’t necessarily a sign of defect or damage. It’s often the result of factory tuning to ensure optimal frequency. These types of antenna have a nominal tuned frequency, but are often impacted by construction, components location and soldering. Placing small nicks in the centre of the long edges, or corners, can fine tune its frequency.

Is a Barometer Needed?

A barometer measures altitude using air pressure, and while many flight controllers come with one built-in, e.g. the BMP280 (such as the Speedybee F405 V4 and RushFPV F722 V2), it’s not a must for GPS Rescue mode. However, having a barometer can improve altitude control. Just remember, if you’re applying conformal coating for water resistance, avoid covering the barometer.

Some GPS modules offer a built-in barometer for an extra cost. If your flight controller doesn’t have one, adding a module with a barometer could be beneficial.

Is a Compass Necessary?

A compass (as known as magnetometer in Betaflight) is for determining directions.

Some GPS modules offer built-in compass, which can be connected to the FC via the i2c port (SCL and SDA). However, Betaflight Rescue Mode doesn’t require a compass to work, it can work out its direction from GPS data.

In fact, an improperly calibrated compass might cause more issues than it solves. In my tests, Rescue mode worked perfectly fine without a compass.

How to tell if a GPS module has built-in compass? If it has 6 wires or solder pads, it means it has a compass – 5V and GND for power,  TX and RX is for the GPS, and SCL and SDA (i2c port) are for the compass. If it doesn’t have a compass, then there should only be 4 wires/pads – 5V, GND, TX and RX.

Connecting GPS to Flight Controller

Wiring a GPS module to the flight controller is quite straightforward. Simply connect it directly to any available UART on the FC, (TX to RX, RX to TX), and power it with 5V.

GPS RX – FC TX GPS TX – FC RX GPS 5V – FC 5V GPS GND – FC GND GPS SDA – FC SDA (if GPS has a compass/barometer) GPS SCL – FC SCL (if GPS has a compass/barometer)

Avoid using Softserial for your GPS connection, as it’s limited to a 19200 baud rate. At 9600 baud, GPS reliability for Rescue Mode is compromised. A hardware serial port is your best option for a stable and reliable connection.

Gps Flight Controller Fc Connection Wiring Fpv Drone Betaflight Bn220 Bn180

Some flight controllers, like the Speedybee F405, feature 4V5 pads. These are essentially the same as 5V pads but have the added benefit of drawing power from USB. This is particularly handy for those times when the GPS is taking a while searching for satellites. By using the USB for power, you avoid the risk of your VTX overheating while waiting on the ground with a LiPo battery plugged in. It also helps the GPS lock faster since the VTX isn’t transmitting and causing interference. Note that some FCs might offer 5V pads powered by USB but under different labels; check with a multimeter if unsure.

How to Setup GPS in Betaflight

GPS Rescue mode in Betaflight is continuously evolving, so it’s crucial to use the latest firmware version for new features and bug fixes. I recommend upgrading to Betaflight v4.5 for this process: https://oscarliang.com/betaflight-4-5/

First, in the Configuration tab of the Betaflight Configurator, activate GPS for navigation and telemetry under the Other Features section. If GPS always deactivates after a reboot, it might be due to not selecting GPS in the Cloud Build options during firmware flashing.

Betaflight 4.5 Gps Rescue Setup Enable Feature Configuration

Next, in the Ports tab, assign GPS to the appropriate UART under “Sensor Input.” Betaflight supports various baud rates: 9600, 19200, 38400, 57600, 115200. If you are unsure what baudrate your GPS module supports, selecting AUTO usually works. If not, 57600 or 115200 are common rates in GPS modules.

Gps Setup Betaflight Ports Uart Auto Baud

In the GPS tab, do the following:

Select UBLOX as the Protocol, which is the standard for most GPS. Enable Auto Config. Enable Use Galileo – it improves positioning accuracy. Enable Set Home Point Once to prevent resetting the home location with each arm/disarm cycle until you unplug the battery. Choose Auto-detect for Ground Assistance Type to enhance positioning accuracy. Save and Reboot.

Betaflight 4.5 Gps Rescue Setup Configuration Settings

After setting up, the GPS indicator at the top of the configurator should light up, indicating communication with the FC. A red icon means GPS is talking to the FC but without a lock, and a yellow icon indicates a successful GPS lock.

If the GPS indicator remains off, check for

GPS is not powered? Try plugging in battery? Incorrect parameters, for instance, wrong baud rate or protocol. Incorrect wiring, try swapping TX and RX.

Betaflight 4.5 Gps Rescue Setup Top Icon Red Yellow

How to check if GPS is working?

Wondering if your GPS module is talking to the flight controller? The ‘gpspassthrough’ command in the CLI can reveal any ongoing data exchange. Seeing a stream of binary data means communication is happening.

Run the ‘gpspassthrough‘ command in the CLI can reveal any ongoing data exchange between the FC and GPS.

Seeing a stream of hieroglyphic binary data characters means communication is happening. If you see nothing, there may be an issue with power, UART connection, or your setup.

Gps U Center Betaflight Cli Serial Passthrough

Waiting for GPS Lock

Getting a GPS lock, or “3D fix,” requires locking onto at least four satellites and can take a few minutes.

When you power up the GPS module for the first time in a new location, it always takes longer to search for satellites, known as a “cold start”. Subsequent starts tend to be quicker as the module remembers satellite positions (for example when you change battery).

It’s harder to get a lock indoor. If you have to test this inside the house, try to get close to the windows with the antenna pointing to the sky.

You will see GPS related information under the GPS tab, where it shows the status of your lock, your GPS coordinates and location on a map, verifying the accuracy of your GPS lock.

Betaflight 4.5 Gps Rescue Setup Map Current Location

LED Indicators

On most GPS such as the BN220, BN180 and BN880, there are two LED indicators, labelled “TX” (usually blue) and “PPS” (usually red).

Flashing blue (TX) indicates UART connection. If it is off, then the GPS is not sending data out. This is also an indicator of the refresh rate, in 1Hz it should flash once per second, while in 5Hz it will flash 5 times a second.

Flashing red (PPS) indicates the 2D/3D fix status of the GPS. If “PPS” is off then you don’t have a fix yet.

When it gets a 3D fix, the red LED on the BN-220 module should blink (together with the blue LED).

OSD

You can display GPS info in the OSD. Check out this tutorial about Betaflight OSD if you are not familiar with it. You can display GPS coordinates, distance and direction to home and more.

Gps Osd Elements Betaflight Home Arror Direction Distance Speed Coordinates

To know how many satellite have been acquired, place the gps sats element in your OSD. 6-8 is the minimum for rescue mode to work, the more the better. Your GPS coordinates will also get more accurate when you acquire more satellites.

Gps Sats Satellites Lock Osd Element Betaflight

You can also display HDOP next to the number of satellites. HDOP is a measurement of the health of the GPS locks. A HDOP value of 1 or below is ideal, which would give you an accuracy of about 2.5 meters or less. It might be oversimplying, but just think of it as how much the drone would be drifting horizontally in meters.

To do this, go to the CLI, and enter:

set osd_gps_sats_show_hdop = on

save

Radio Telemetry

Once you have GPS setup and got a lock, go to the radio’s telemetry page, select “Discover new sensors”. Some GPS related new sensors should appear including GPS coordinates. This only works if your radio system supports Telemetry – such as ExpressLRS and Crossfire.

This allows you to log GPS coordinates in your radio, it allows you to keep track of the last known position of your aircraft. This can be helpful for searching for the lost quadcopter if you can’t see the coordinates in your DVR.

Testing Angle Mode

Betaflight’s GPS Rescue mode relies on Angle mode — a self-leveling flight mode — to stabilize the drone. Therefore, it’s essential to ensure Angle mode is functioning correctly.

First, verify that the Accelerometer is enabled in the Configuration tab.

Betaflight Configurator 10.9.0 Configuration Accelerometer Enable

Next, proceed to the Setup tab and calibrate the Accelerometer on a level surface. Failure to do so might result in the drone drifting while in Angle mode.

Betaflight Configurator Setup 10.8

To test Angle mode, try hovering the drone to see if it’s self-levelling as expected. Remember, Angle mode uses only the Accelerometer and Gyro, so it won’t keep the drone perfectly stationary like a DJI drone would. A slight drift due to weight distribution and wind is normal, as long as the drone remains stable. If drifting is noticeable, you can trim the accelerometer in the Configuration tab to minimize it (but unlikely to completely eliminate it so don’t worry).

Also, take note of the throttle position during hover. This value will be useful when setting up Rescue mode later.

Enabling GPS Rescue Mode in Failsafe

Navigate to the Failsafe tab in the Betaflight Configurator. If you can’t find this tab, make sure you’ve enabled the “Expert Mode” option at the top of the screen (next to the Update Firmware button).

Betaflight 4.3 Configurator 10.8 Expert Mode Enabled Pid Tuning

Under Stage 2, select GPS Rescue. Now, if your drone enters failsafe, it will trigger GPS Rescue Mode.

betaflight gps rescue mode failsafe

So, what exactly is failsafe, and what are stage 1 and stage 2? Here’s a quick rundown: Your drone enters failsafe upon losing radio signal. By default, it would just drop to the ground, but with Rescue Mode, it will attempt to return home.

During a failsafe, your drone will first enter Stage 1, pausing briefly (guard time) to see if the signal returns. If not, it progresses to Stage 2, activating Rescue mode to bring the quad back.

While setting GPS Rescue as your failsafe method is beneficial, it’s not suited for all environments. For instance, it’s not advisable in bando, forests, stadiums, or indoors. Losing control under a tree or inside a building could result in the drone crashing into obstacles when Rescue mode engages.

If you have no GPS lock when it failsafes, the quad will (should) just drop to the ground.

What Happens after Rescue Mode is Activated?

Watch GPS Rescue Mode in action here:

https://youtu.be/DHg7Snr8jiM

Rescue mode involves 5 phases:

Ascend: The drone climbs to a predetermined altitude or the maximum altitude reached during that flight. Rotate: It turns towards the home direction. Fly Home: The drone begins its journey back to the launch point. The flight might not be a smooth cruise, exhibiting some lateral movements as it navigates home, but it will eventually arrive. Descend: Once near the launch point, within a 5x5m area, it starts descending slowly. The descent might be uneven, with the motors making pulsating sounds as the drone tries to slow down. Land: Upon touching the ground, the drone automatically disarms, with motors terminating based on impact, not based on altitude. How to Stop Rescue Mode

If Rescue mode was activated via a switch, regaining full control is as simple as disengaging that switch.

If activated by failsafe:

If it’s a real failsafe triggered by a loss radio link, the pilot must move the sticks more than 30% to regain control after radio link comes back. If the failsafe was triggered manually via a switch, simply disengage the failsafe switch — no need to wiggle the sticks. GPS Rescue Settings Explained

Settings for GPS Rescue mode are available in the Failsafe tab.

Betaflight 4.5 Gps Rescue Setup Failsafe Settings

You have to tweak the GPS Rescue settings in Betaflight to your specific setup and environment. I highly recommend visiting the Betaflight wiki to grasp a full understanding of what each parameter entails: https://github.com/betaflight/betaflight/pull/11579. The default settings offer a solid starting point, especially for 5″ freestyle drones.

Here, I’ll walk you through the settings, sharing the values I use on my 5″ freestyle drone and the reasoning behind each choice.

Accessing all settings is straightforward via CLI—just enter get gps_rescue for a comprehensive list of GPS-related parameters. However, adjusting them in the GUI (Failsafe tab) tends to be more user-friendly.

Altitude Mode: It determines the altitude at which the quad returns home.

Maximum altitude is the highest altitude your quad is flown during that flight Fixed altitude is just a predefined value Current altitude is whatever height that the quad is at when GPS rescue mode is activated

The best choice varies with each flight’s context and environment. Maximum altitude can be a safe option, but it’s not always the right option. For instance, if you was diving a mountain in that flight, you could be wasting energy climbing back to the max altitude when Rescue mode is activated. When flying over ocean where there’s no obstructions, fixed altitude could be a good option. Use common sense, be adaptive to the different environment and missions.

Initial Climb (meters): The distance the quad will climb to this height above the current altitude, when a rescue is initiated and the altitude mode is set to Current Altitude. Also added when in Max Altitude Mode.

Return Altitude (meters): Only applies in Fixed Altitude mode. This determines the drone’s return altitude relative to its takeoff point. It should be high enough to clear any obstacles like trees and buildings but not so high that it excessively consumes battery during ascent. For my flying spots, which features tall trees and small hills, I’ve bumped this up to 50 meters.

Ascend/Descend Rate (meters/second): These rates depend on your environment, weather, and quad’s power. For my 5″ setup, the defaults should work well. If using Li-ion packs or low C-rating LiPo, consider a lower ascend rate.

Return ground speed (meters/second): This is the speed at which the quad travels during Rescue. The default 5m/s is 18km/h which I find way too slow, I normally double that to 10m/s (36km/h) for micro drones, or 14m/s (50km/h) for 5″ and 7″ drones. The quad’s travel direction would be more accurate and update faster in higher speed (in the absence of a compass). Do not set it to lower than 2m/s or orientation won’t work. Note when entering this value in GUI, the unit is different than CLI (which is cm/s).

Maximum Pitch Angle: This setting caps the drone’s tilt angle. A higher angle leads to more aggressive returns and higher speed. Maybe useful for heavier, high drag and low authority drones. In windy conditions, a higher angle might be necessary for maintaining speed, especially for smaller quads. However, with an excessively steep angle the drone could lose altitude and crash. Unsure of what to set? Starting with the default value of 40 degrees is a safe bet—it’s worked well for my setup.

Descend Distance (meters): This is the distance from home our drone starts to descend. I stick with the default here.

Throttle minimum, Throttle maximum, Throttle hover –  these are the min, max and hover throttle values you want to use during Rescue mode. Set maximum so the quad isn’t too fast/jerky (it should be above your hover point), set min to keep the props spinning at a reasonable rate (it should be lower than your hover point). I left Throttle Min/Max at default.

To set Throttle Hover, you need to determine an accurate value. Test fly your quad and see at exactly what throttle it hovers (just enough throttle to keep the quad afloat), literally every quad is different. Use the “Throttle %” OSD element to get the exact value instead of just guessing. According to info in the pull request, “the correct value should cause the quad to climb a bit while in level mode… If these values are set too low, the quad will drop early in the rescue – possibly into the water!”.

Minimum Distance to Home (meters): If Rescue starts too close to home (within this minimum distance), the drone will fly away on its current heading until this distance from home, and start the normal Rescue behaviour. I leave this at the default 15 meters.

Minimum Satellites: A minimum of 8 satellites ensures reliable Rescue mode operation. If you take off before the GPS reach the minimum amount of satellites, it won’t know the exact home location. More satellites mean better accuracy. I leave this at the default, 8.

Allow Arming Without Fix: This option provides flexibility by allowing arming without a GPS lock. I enable this for the convenience of test flights, but ensure you get a GPS lock for when you intend to use GPS Rescue Mode.

Beware that GPS Rescue WILL NOT work for that flight if you arm before getting a satellite lock (because it doesn’t know the home position).

If you have trouble getting these many sats (or it takes a long time), check out my tutorial on how to boost your GPS receiver performance. Get a new GPS if you must, they only cost $15, a great investment for protecting your $300 quad!

Sanity Checks: When set to “ON”, it monitors GPS Rescue mode conditions, for example:

Is the GPS still connected to the FC? Are we getting a good number of satellite locks? Are we at least 20 meters away from home? Are we getting closer to the home, and we didn’t hit an obstacle?

If any of these conditions are not met, it will abort rescue mode and your quad will just disarm and drop to the ground. So yea, it’s not ideal if you are flying over unrecoverable places like ocean or mountains, but generally, it should be on for safety reasons.

The Betaflight wiki also recommends setting Sanity Checks to “Failsafe Only” if you are having trouble with the option “On” during testing. It turns Sanity Checks off when Rescue mode is activated by a switch but only turns it on when it’s in failsafe. This is also my preferred option.

It’s risky to turn off Sanity Check entirely, you might get an indefinite flyaway. In Betaflight 4.4, there is now a limit of 20s of sanity failure even if all sanity checks are off. It is a safety thing. Never fly with all sanity checks off.

How to Manually Activate GPS Rescue?

Besides failsafe, you have the option to manually trigger GPS Rescue by flipping a switch on your radio transmitter. This feature comes in handy during emergencies, such as losing your way or encountering issues with your FPV system, allowing your drone to autonomously return home.

Go to the Modes tab in Betaflight Configurator and assign an AUX channel specifically for GPS Rescue Mode. If you’re new to configuring modes, check out my tutorial here: https://oscarliang.com/betaflight-modes/

betaflight gps rescue mode switch activate

Throttle Channel Fallback

During Stage 1 of a failsafe, your drone goes into channel fallback, meaning each radio channel is set to predefined values. It’s wise to review these values to ensure safety.

By default, the Channel Fallback for Throttle is set to “Auto,” which reduces the throttle to zero, results in the motors stopping momentarily during the guard time. This interruption could destabilize the drone before GPS Rescue kicks in, potentially failing a sanity check and causing the drone to drop to the ground.

One solution is to adjust the Throttle Channel Fallback from “Auto” to “Hold,” maintaining the last throttle value throughout the guard time, preventing motor stalling.

However, I personally prefer setting the throttle to the hover value, as well as centering all roll/pitch/yaw channels, and engaging Angle mode. This way, the quad levels itself and doesn’t ascend or descend when failsafe happens, before GPS Rescue engages.

Remember, never set throttle to zero during Stage 1 of failsafe!

Betaflight Configurator Failsafe Gps Resuce Settings Bf 4.4

How to Test GPS Rescue

Testing GPS Rescue is a crucial step before relying on it in real-world scenarios. Here’s my approach to ensuring it works as expected.

The Setup

First, assign a switch on your radio to GPS Rescue to confirm it can indeed bring your drone home. Should anything not go according to plan, flicking the switch off should immediately return control to you.

Next, allocate another switch to Failsafe in the Modes tab. This simulates a full failsafe event, just like losing RC signal, but in a much safer manner since you can exit the mode whenever necessary using the switch. It’s important to note that this setup is strictly for testing purposes. Once you’re finished, remember to remove Failsafe in the Modes tab.

Betaflight Configurator Modes Failsafe

With the propellers removed, head to the Modes tab and ensure that activating the Failsafe switch indeed triggers Rescue mode, during which your radio sticks will be momentarily locked out. Verify if you can exit failsafe mode and regain control smoothly.

While bench testing with a USB connection, the Rescue mode indicator might not illuminate as other flight modes do. However, as long as the small yellow bar bar moves into the activation zone, it’s working correctly.

Incorporating GPS-related information into your OSD is beneficial, providing insights into the drone’s status. The Flight Mode indicator is particularly helpful, displaying “RESC” when in Rescue mode, “Air” in rate mode, and “Angle” in angle mode.

Field Testing

For an actual test, choose an open area free from obstacles and people. Ensure the OSD shows a sufficient number of locked satellites before arming.

Take off and fly in a straight line for 100-200 meters, then trigger Failsafe mode using the switch. The quad should promptly switch to GPS Rescue mode—observe this transition in the OSD’s flight mode display.

Pay attention to the home arrow in the OSD; when it’s pointing up, means you’re heading home, when pointing down means you’re flying away. Initially, the arrow might point in the wrong direction, which is normal as it takes a few seconds for Betaflight to work out which direction it’s heading—just ensure the drone isn’t flying the complete opposite direction.

You can quit failsafe mode at any time by flipping the switch, regaining full control immediately.

If you choose not to disengage, the drone will continue flying back to the launch point. Upon arrival, it will hover briefly before starting a slow descent, during which the motors may pulsate, until it safely lands and disarms automatically.

Repeat this process a few times, until you’re confident in the system’s reliability. After thorough testing, don’t forget to remove Failsafe from the Modes tab.

Tips and Troubleshooting Best Places to Mount GPS Module

Making sure your GPS module’s ceramic patch antenna has an unobstructed view of the sky is crucial for quick and reliable satellite lock-on. Anything covering it, particularly conductive materials like carbon fiber, electrical wires, or metal, can significantly weaken the GPS signal.

Avoiding EMI

Electromagnetic interference (EMI) from other electrical components on your quad can also affect GPS performance. Notable sources of RF interference include HD cameras and video transmitters. To mitigate this, mount your GPS as far away from these devices as possible.

Proper Mounting Orientation

A common error is mounting the GPS upside down. The receiver antenna, identifiable by its flat square shape with a small metal circular part in the center, should always face upwards. Ensure no components obstruct this side. In the following image for example, the ceramic antenna is facing up.

Holybro Nano Ublox M8 5883 Gps Module

Placement Strategies

Make sure there’s nothing blocking the GPS unit at all times. Ideal mounting spots include the top of your quad, far away from VTX and RX antennas, and away from potential radiation sources like HD cameras lacking proper shielding. Here are a few mounting ideas:

Hglrc Sector X5 Bnf Fpv Drone Rx Vtx Antenna Gps 3d Print

Stp Hobby Armor 5 Fpv Drone Rushfpv Rx Vtx Antenna Gps Mount

On top of your GoPro/HD camera.

On top of the frame if using an under-slung battery setup.

On a mast to elevate the GPS away from the quad. However, be cautious of proximity to VTX antennas.

Getting a GPS Lock Faster

Most GPS modules feature a small battery to store satellite data and time, aiding faster lock-on. Once the GPS has locked onto satellites, it retains their positions for quick reconnection after battery changes. If your GPS consistently takes long to lock, check if its battery is depleted using a multimeter. Minimize interference as much as possible—for instance, by relocating a powerful VTX, especially if you’re on a 1.3GHz FPV setup. Weather conditions like cloudy days can also impact GPS signal quality.

For more tips on optimizing BN220 for increased satellite locks, check out my dedicated tutorial: https://oscarliang.com/gps-settings-u-center/

Suggestions directly from Betaflight Developers

I recommend 10 satellites. [And] Wait for 30s after [you have] 10 satellites for altitude to stabilise [before taking off].

Always confirm normal GPS Rescue behaviour at the start of a critical flight by testing with the failsafe switch. Set the switch to immediately enter Stage 2. You can enter and leave GPS Rescue via the switch with immediate on and off effect. Check that the quad rotates and flies towards home and does the right things before you are so far away that a true failsafe may occur.

ALWAYS CHECK that the Home Arrow points directly back towards home after takeoff! Sometimes, if you take off and spin around during arming or immediately on takeoff, the quad’s attitude information can become corrupted, and the Home Arrow can point the wrong way. It’s best to arm cleanly and fly away from Home in a straight line at a reasonable speed immediately after takeoff. Watch the Home Arrow carefully to ensure it quickly points back to Home. If the Home Arrow points the wrong way when a failsafe occurs, the GPS Rescue will initially fly off in the wrong direction, and in some cases, you may lose the quad.

Wrong Direction in Rescue Mode?

Without a compass, rescue mode should still work as the quads calculate direction through GPS data comparison.

At the beginning, your quad might be wandering around or even flying towards the wrong direction but eventually it should self-correct. With weak GPS connection, it can take longer to correct.

If you are using a compass and it’s flying the wrong direction, then maybe there’s something wrong with the compass, or maybe it’s not calibrated properly. In this case try turning off magnetometer in Betaflight and try again. If it works now, it proves your compass is the source of the problem.

If your yaw is jerky during Rescue mode, your GPS might be updating too slowly (e.g. 1Hz), try to increase it to 5Hz or even 10Hz following this guide (only works on certain GPS modules).

Avoid Softserial

Avoid using Softserial for GPS, as it only supports up to 19200 baud rate, and with 9600 baudrate the GPS is simply not reliable enough for GPS features. It’s best to use a hardware serial port (any TX and RX pins on the FC), and set baudrate to at least 57600.

Not Getting GPS Lock

Interference from your quad’s electronics, such as the VTX, telemetry-equipped radio receivers, or even wires carrying significant current, can hinder your GPS’s ability to lock onto satellites. If you’re facing difficulties achieving a GPS lock, consider the following steps:

Power the Flight Controller (FC) via USB to check if it powers the GPS module. If not, move the GPS module’s power connection to a different pad on the FC that gets power from the USB port. Isolate the FC’s Power Supply: Powering only the FC without the VTX can help you get a quicker GPS lock. Nevertheless, it’s advisable to mount your GPS as far as possible from both the VTX and RX antennas to minimize potential interference. Shielding Electrical Wires: shielding wires that conduct significant current can mitigate interference. These wires can act like antennas, potentially disrupting GPS signals.

GPS satellites operate on two frequencies, L1 1575.42MHz and L2 1227.60MHz. Consequently, a 1.3GHz FPV setup might interfere with your GPS. The majority of pilots use 5.8GHz, which generally avoids this problem. However, given the weak GPS signal—originating from satellites in space—even strong nearby signals can cause interference. Thus, positioning the GPS module away from any transmission sources is crucial.

Running GPS wires under the VTX can cause issues, particularly if the VTX lacks adequate RF shielding. This RF noise can compromise GPS functionality. For example, the Avatar VTX V1 was known to cause GPS problems when wires are routed underneath it. A potential fix involves grounding the VTX’s shielding. Alternatively, shielding the wires between the GPS and FC—and ensuring they’re grounded—might offer a solution.

Gps Wire Cable Ground Shielding Foil Betaflight Fc

I tried to shield wires with foil in one of my builds, then connected the foil to a ground pad on the FC. After wrapping it with cloth tape to prevent short-circuiting the frame, I noticed minimal improvement. While some have reported positive outcomes with this modification, it’s worth exploring if other straightforward solutions are unavailable.

Failed to Activate GPS After Updating Betaflight

If you’re unable to enable GPS after flashing the latest Betaflight version, it’s possible that some features including GPS were excluded from the compiled firmware – a new feature called Cloud Build System.

To verify if this is the problem, enter the following command in the CLI:

feature gps

Should the CLI respond with “gps not available,” it indicates that the GPS functionality was not included in your FC’s Betaflight firmware. To resolve this, you’ll need to reflash your FC. This time, ensure that the GPS option is selected in the Cloud Build system during compilation: https://oscarliang.com/flash-update-betaflight/#Cloud-Build-System

Understanding GPS Coordinates Precision

When displaying GPS coordinates in the OSD, you’re provided with options to choose the number of decimal places shown—currently, only 4 and 7 decimal options are available. This selection directly influences how accurately you can pinpoint a location on a map based on the GPS data.

The “Decimal Degrees” Wikipedia page provides a detailed table comparing degree precision to physical distance:

decimal places degrees distance ------- ------- -------- 0 1 111  km 1 0.1 11.1 km 2 0.01 1.11 km 3 0.001 111 m 4 0.0001 11.1 m 5 0.00001 1.11 m 6 0.000001 11.1 cm 7 0.0000001 1.11 cm 8 0.00000001 1.11 mm

It’s crucial to differentiate between accuracy and precision in this context. The GPS may display a high degree of precision (number of digits), but not all decimal places may reflect true accuracy. This means that while your GPS can report coordinates to a very fine resolution, the actual accuracy—how close those coordinates are to the real location—may vary.

Edit History Oct 2018: Tutorial creation. Aug 2020: Updates for GUI and CLI parameter changes, addition of throttle settings. Feb 2023: BF4.4 update with auto-landing feature. Mar 2024: BF4.5 update. advancedbetaflightGPS


【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有